/**
 * @Description: 配置修改指令
 * @author Beon
 * @date 2021/1/25
*/
import {Command} from '../types/command';
import {ClassTool} from '../decorators/classTool';
import {OtherInquirer} from '../inquirer/otherInquirer';
import {OraLoading} from '../decorators/oraLoading';

export class LzConfig implements Command{
    @OraLoading.beProxy
    status: OraLoading // 执行状态

    constructor() {
        this.status.value = '输入配置';
    }

    /**
     * 指令运行函数
     * @param {[String]} arg 参数
     * @returns {Promise<void>}
     */
    @ClassTool.saveThis
    async done(arg?: [string]): Promise<void> {
        await OtherInquirer.wirteConfig();

        this.status.value = '';
    }
}
